package com.demo.websocket;

import com.demo.blog.BlogInterceptor;
import com.demo.blog.BlogService;
import com.demo.blog.BlogValidator;
import com.demo.common.model.Blog;
import com.jfinal.aop.Before;
import com.jfinal.aop.Inject;
import com.jfinal.core.Controller;
import top.jfunc.websocket.WebSocketManagerUtil;

/**
 * 测试websocket的使用
 */
public class WebSocketController extends Controller {

	public void send() {
	    String identifier = getPara("identifier");
	    String message = getPara("message");
        WebSocketManagerUtil.getWebSocketManager().sendMessage(identifier , message);
        renderJson("ok");
	}
}


